import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import { Provider } from "react-redux"
// 导入路由  BrowserRouter(history) HashRouter(hash)
import { HashRouter } from "react-router-dom";
import App from './App';

import 'antd/dist/antd.css';

import './assets/css/index.scss';

import "./mock/index"

import store from "./store"
import {persistor} from './store'
import {PersistGate} from 'redux-persist/lib/integration/react';


import Loading from "comp/common/Loading"



ReactDOM.render(
  <Provider store={store}>
     <PersistGate loading={null} persistor={persistor}>
    <HashRouter>
      <Suspense fallback={<Loading></Loading>}>
        <App />
      </Suspense>
    </HashRouter>
    </PersistGate>
  </Provider>,
  document.getElementById('root')
);

